package cn.bby.query.server.infrastructure.db.mapper;

import cn.bby.query.server.infrastructure.db.entity.DelayEventBuf;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author ben
 * @since 2025/6/8 23:56
 */
public interface DelayEventBufMapper extends BaseMapper<DelayEventBuf> {
    @Select("select * from delay_event_buf b where exists(select 1 from interface_info i where b.interface_id = i.interface_id and i.status = 'READY') limit #{limit}")
    List<DelayEventBuf> getReadyEvents(int limit);
}
